package com.example.work_study_system.web.controller;


import com.example.work_study_system.common.JsonResponse;
import com.example.work_study_system.common.utls.SessionUtils;
import com.example.work_study_system.model.domain.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/auth")
public class AuthController {

    @GetMapping("getInfo")
    public JsonResponse getAuth() {
        User user = SessionUtils.getCurrentUserInfo();
        return JsonResponse.success(user);
    }
}
